create borders automatically